int Tracking (ImSize, GlidLen, MinDif, NofHit, NofLines, Lines, Image, Segs)
int     ImSize, GlidLen, MinDif, NofHit, NofLines;
LinTypH *Lines;
BYTE    **Image;
SegTyp  *Segs;
{
   BYTE   Inc, Dir;
   int    i,j,n, r,c, r0,c0,r1,c1, NofSegs, LineLen;
   LinTyp *Line;

   NofSegs = 0;
   Line = (LinTyp *) malloc ((ImSize+ImSize)*sizeof(LinTyp));

   for  (i=0; i<NofLines; i++) {
      r0  = Lines[i].r0;
      c0  = Lines[i].c0;
      r1  = Lines[i].r1;
      c1  = Lines[i].c1;
      Dir = Lines[i].Dir;
      LineLen = GenLine (r0,c0,r1,c1, Line);
      ScanLine (ImSize, Dir, GlidLen, MinDif, NofHit, LineLen,
                &NofSegs, Line, Image, Segs);
   }
   free (Line);
   return (NofSegs);
}
